//
//  GGTWriteReviewTableViewCell.m
//  GGT
//
//  Created by 空空空 on 14/11/4.
//  Copyright (c) 2014年 GGT. All rights reserved.
//

#import "GGTWriteReviewTableViewCell.h"

@implementation GGTWriteReviewTableViewCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        self.label = [[UILabel alloc]init];
        [self.contentView addSubview:self.label];
        self.writeReview = [[UITextView alloc]init];
        [self.contentView addSubview:self.writeReview];
//        self.imgView1 = [[UIImageView alloc]init];
//        [self.contentView addSubview:self.imgView1];
//        self.imgView2 = [[UIImageView alloc]init];
//        [self.contentView addSubview:self.imgView2];
        self.button = [[UIButton alloc]init];
        [self.contentView addSubview:self.button];
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    self.label.text = @"写点评";
    [self.button setTitle:@"提交" forState:UIControlStateNormal];
    self.button.tintColor = [UIColor orangeColor];
    self.label.frame = CGRectMake(10, 10, self.contentView.frame.size.width / 4, self.contentView.frame.size.height / 5);
    self.writeReview.frame = CGRectMake(10 , 10 + self.contentView.frame.size.height / 5, self.contentView.frame.size.width - 20, self.contentView.frame.size.height / 5 * 2 + 10);
    self.writeReview.backgroundColor = [UIColor orangeColor];
//    self.imgView1.frame = CGRectMake(10, 20 + self.contentView.frame.size.height / 5, self.contentView.frame.size.width / 6, self.contentView.frame.size.height / 5);
//    self.imgView2.frame = CGRectMake(10 + self.contentView.frame.size.width / 6, 20 + self.contentView.frame.size.height / 5, self.contentView.frame.size.width / 6, self.contentView.frame.size.height / 5);
    self.button.frame = CGRectMake(self.contentView.frame.size.width / 5 * 4, 50 + self.contentView.frame.size.height / 5 * 2, self.contentView.frame.size.width / 5, self.contentView.frame.size.height / 5);
    self.button.backgroundColor = [UIColor redColor];
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (void)dealloc
{
    [_label release];
    [_writeReview release];
    [super dealloc];
}
@end
